﻿using Lanbt.Core.Entity.Dto;
using Lanbt.Core.Entity.Dto.lanbt_power;
using Lanbt.Core.Entity.Dto.lanbt_system_config;
using Lanbt.Core.Entity.EntityDB;

namespace Lanbt.Core.Service.SqlService.IService
{
    public interface IPowerService
    {
        /// <summary>
        /// 通过ID获取权限信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput<lanbt_power>> GetPowerById(string id);

        /// <summary>
        /// 分页查询权限列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagesResultOutput<QueryPagedPowerListOutput>> QueryPagedPowerList(QueryPagedPowerListInput input);

        /// <summary>
        /// 查询父级下拉列表
        /// </summary>
        /// <returns></returns>
        Task<ResultOutput<List<XM_SelectOutput>>> QuerySelectList();

        /// <summary>
        /// 获取权限树状集合
        /// </summary>
        /// <returns></returns>
        Task<IList<TreeData>> QueryPowerTreeData();

        /// <summary>
        /// 获取菜单集合
        /// </summary>
        /// <returns></returns>
        Task<ResultOutput<List<QueryMenuListOutput>>> QueryMenuList();

        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput> InsertPower(InsertPowerInput input);

        /// <summary>
        /// 根据ID删除权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput> DeletePowerById(string id);

        /// <summary>
        /// 根据Ids批量删除权限
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<ResultOutput> DeletePowerByIds(string[] ids);

        /// <summary>
        /// 修改权限
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput> UpdatePower(UpdatePowerInput input);

        /// <summary>
        /// 菜单隐藏或显示
        /// <remark>菜单类型为【文件夹、页面】可以设置，【按钮、权限】不可设置</remark>
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput> UpdateMenuShowOrHide(string id);

        /// <summary>
        /// 启用权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput> UpdateMenuEnable(string id);
    }
}
